#ifndef SPRITE_MANAGER_HPP
#define SPRITE_MANAGER_HPP

#include "spritedefinition.hpp"
#include "sprite.hpp"
#include <iterator>

class SpriteManager
{
private:
    std::vector<SpriteDefinition *> spriteDefinitionList;
    SpriteDefinition* LoadSpriteDefinition(std::string name);
    std::vector<Sprite *> spriteList;
    unsigned int size;

public:
    SpriteManager();
    Sprite* CreateSprite(std::string spriteName);
    void AddSpriteDefinition(std::string name, std::string texture);

    std::vector<Sprite *>::iterator Begin() { return this->spriteList.begin(); }
    std::vector<Sprite *>::iterator End() { return this->spriteList.end(); }

    void Update();
    unsigned int GetSize();
    Sprite* GetSprite(unsigned int id);
};

#endif
